<template>
	<div>
		<h2>父组件</h2>
		<coms ref="son" :name="name1" @fn="fa"></coms>
	</div>
</template>

<script>
	import coms from './coms'
	export default {
		provide() {
			return {}
		},
		data() {
			return {
				key: 'value',
				name1: 'done1'
			}
		},
		methods: {
			fa(val) {
				console.log(val)
			}
		},
		mounted() {
			this.$refs.son.key = 'son'
			console.log(this.$children[0])
			console.log(this.$refs.son)
		},
		components: {
			coms
		}
	}
</script>

<style lang="scss" scoped></style>
